﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Utility.Contracts;
using Utility.DBUtility.ORM.EntityAttribute;

namespace Quick.CodeGenerator.Model
{
    /// <summary>
    /// 数据库链接字符串信息
    /// </summary>
    [DbTable("DbInfo")]
    public class DbInfo: EntityBase
    {
        private string _ID;
        /// <summary>
        /// ID
        /// </summary>
        [DbColumn(ColumnName = "ID", IsPrimary = true, DbType = Utility.Data.DbClient.DBType.SQLite_String, Length = 100)]
        public string ID
        {
            get { return _ID; }
            set
            {
                AddPKChange("ID", _ID, value);
                AddPropertyChange("ID");
                _ID = value;
            }
        }
        private string _DbName;
        /// <summary>
        /// 数据库名称
        /// </summary>
        [DbColumn(ColumnName = "DbName", IsPrimary = false, DbType = Utility.Data.DbClient.DBType.SQLite_String, Length = 100)]
        public string DbName
        {
            get { return _DbName; }
            set
            {
                AddPropertyChange("DbName");
                _DbName = value;
            }
        }
        private string _DbConnectionString;
        /// <summary>
        /// 数据库链接字符串
        /// </summary>
        [DbColumn(ColumnName = "DbConnectionString", IsPrimary = false, DbType = Utility.Data.DbClient.DBType.SQLite_String, Length = 500)]
        public string DbConnectionString
        {
            get { return _DbConnectionString; }
            set
            {
                AddPropertyChange("DbConnectionString");
                _DbConnectionString = value;
            }
        }
        private string _DbType;
        /// <summary>
        /// 数据库类型
        /// </summary>
        [DbColumn(ColumnName = "DbType", IsPrimary = false, DbType = Utility.Data.DbClient.DBType.SQLite_String, Length = 100)]
        public string DbType
        {
            get { return _DbType; }
            set
            {
                AddPropertyChange("DbType");
                _DbType = value;
            }
        }
    }
}
